package com.ittao.taopicturebackend.model.enums;

import lombok.Getter;

/**
 * 图片标签枚举
 */
@Getter
public enum PictureTagEnum {

    // 常用标签
    HOT("hot", "热门"),
    FUNNY("funny", "搞笑"),
    LIFE("life", "生活"),
    HD("hd", "高清"),
    ART("art", "艺术"),
    CAMPUS("campus", "校园"),
    BACKGROUND("background", "背景"),
    RESUME("resume", "简历"),
    CREATIVE("creative", "创意"),

    // 风格标签
    MODERN("modern", "现代"),
    VINTAGE("vintage", "复古"),
    MINIMALIST("minimalist", "极简"),

    // 场景标签
    OUTDOOR("outdoor", "户外"),
    INDOOR("indoor", "室内"),
    URBAN("urban", "城市"),

    // 其他
    PROFESSIONAL("professional", "专业"),
    CASUAL("casual", "休闲");

    private final String text;
    private final String value;

    PictureTagEnum(String text, String value) {
        this.text = text;
        this.value = value;
    }

    /**
     * 根据 value 获取枚举
     */
    public static PictureTagEnum getEnumByValue(String value) {
        if (value == null) {
            return null;
        }
        for (PictureTagEnum tagEnum : PictureTagEnum.values()) {
            if (tagEnum.value.equals(value)) {
                return tagEnum;
            }
        }
        return null;
    }
}
